Skip to content

Support running multiple init LLDB commands#840

Merged
xusheng6 merged 2 commits intodevfrom
copilot/fix-823
Sep 23, 2025
Merged

Support running multiple init LLDB commands#840
xusheng6 merged 2 commits intodevfrom
copilot/fix-823

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 19, 2025

This change enables users to specify multiple LLDB initialization commands instead of being limited to a single command. The common.initialLLDBCommand setting has been updated from a string to an array of strings.

Changes Made

Setting Registration:

  • Changed setting type from "string" to "array"
  • Updated default value from "" to []
  • Modified title from "Initial LLDB Command" to "Initial LLDB Commands"

Code Implementation:
Updated three key methods to iterate through multiple commands:

  • ExecuteWithArgs() - for launch scenarios
  • Attach() - for attach scenarios
  • Connect() - for connect scenarios

Usage Examples

Before (single command only):

"common.initialLLDBCommand": "settings set target.x86-disassembly-flavor intel"

After (multiple commands supported):

"common.initialLLDBCommand": [
  "settings set target.x86-disassembly-flavor intel",
  "settings set target.process.disable-aslr true",
  "breakpoint set --name main"
]

Backward Compatibility

The change is fully backward compatible:

  • Empty array [] behaves the same as the previous empty string ""
  • Single command arrays ["command"] work seamlessly
  • Implementation follows existing patterns used by environmentVariables

Implementation Details

The implementation follows the existing vector<string> pattern used by environment variables, ensuring consistency with the codebase. Empty commands in the array are filtered out to prevent issues with whitespace-only entries.

Fixes #823.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Support running multiple init LLDB commands Support running multiple init LLDB commands Sep 19, 2025
Copilot AI requested a review from xusheng6 September 19, 2025 09:18
@xusheng6 xusheng6 marked this pull request as ready for review September 23, 2025 08:03
@xusheng6 xusheng6 merged commit 8ffdb19 into dev Sep 23, 2025
1 check was pending
@xusheng6 xusheng6 deleted the copilot/fix-823 branch September 23, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support running multiple init LLDB commands

3 participants